import { defineStore } from "pinia";

export const useUserStore = defineStore('user', {
  state: () => {
    return {
      lang: 'en',
      themeData:{}
    }
  },
  getters: {

  },
  persist: true,
  actions: {
    async setLangData(val:string) {
      // 异步或同步
      this.lang = val
    },
    async setThemeData(val:Object) {
      this.themeData = val
    }
  },
})